home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 30 / Mac Magazin and MacEasy Magazine CD - Issue 30.iso / utilities / Mac OS / print66 / ReadMe < prev   
Text File  |  2002-01-13  |  14KB  |  194 lines

  1. Print66
  2.  
  3. What is it ?
  4.  
  5. Print66 is a utility that implements the Berkeley Line Printer Protocols on the Macintosh. It normally spools files sent from a remote host (for instance an Unix machine) and sends them to a LaserWriter on the Mac network, a Serial printer or an USB printer. It can also be used to print any file to a Laserwriter printer.
  6.  
  7. Print66 should run under System 7 and requires MacTCP or OpenTransport TCP/IP.
  8.  
  9. This program is really a quick and dirty work, which in many aspects does not conform to Macintosh user interface, but I may rework it if I have enough time and/or someone find it useful. Bug reports and suggestions are welcomed at barijaona@geocities.com.
  10.  
  11. This program is freeware and will stay freeware. As the program is free, it comes without any warranty. You use it at your own risks.
  12.  
  13. Setting Up Print66 as server on a Macintosh
  14.  
  15. Print66 looks for a folder called "Spool Folder" in your system folder and a text file called LPD.config in the "Spool Folder" folder. A sample LPD.config file is included in this package. The sample contains detailed information about setting up for your installation.
  16.  
  17. For a quick setting :
  18.  
  19.  
  20. • in the file LPD.config in the "Spool Folder", edit the PRINTER section and HOST section to define which printers are connected and which remote computers are allowed to print.
  21. For instance :
  22. PRINTER pslaser PAP "Laserjet 5" POSTSCRIPT
  23. PRINTER raw1 SERIAL "Printer port" 57600 10 N 8 XON # a printer connected using PowerPrint™ serial to parallel cable
  24. PRINTER raw2 USB "Stylus Photo 750:Stylus Photo 750"
  25. HOST 192.168.1.5
  26. HOST s2345678.acme.com 
  27. • copy the "Spool Folder" into your system folder. 
  28.  
  29. Important Note : If you used serial printers with a version of Print66 prior a 0.5, you will have to modify the LPD.config file. See explanations in the sample file.
  30.  
  31. Known issue : with my Epson Stylus Photo 750 and my G4 Cube under MacOS 9.0.4, after a cold start, it seems that you have to print something using Epson's driver before Print66 and other applications addressing directly the USB port achieve to send data. It seems to be a hardware issue, as there is no problem after a warm reboot. If you encounter something similar, please let me know.
  32.  
  33. What's in the LogFile
  34.  
  35. The log file keeps a record of everything printed through the spooler as well as all errors. This file can be cleared by using the "Clear Log File" entry under the "File" menu.
  36.  
  37. If you are experiencing problems you may want to turn debugging on by adding a DEBUG command to the config file. This causes extra debugging information to be sent to the log file.
  38.  
  39. The log file may be cleared using the "Clear Log File" entry in the file menu. When this is done the contents are first mailed to the ADMIN specified in the config file.
  40.  
  41. What if I Send a non-PostScript file to a PostScript printer
  42.  
  43. The program checks the first 2 characters in the file looking for %! which it would assume to be in all postscript file. If these two characters are not there, Print66 will reject the file and mail the owner.
  44.  
  45. What to do on an Unix box to set it up as a print client
  46.  
  47. //Based on information's provided by Casper Boon//
  48.  
  49. The Unix machine needs to be told about the printer. This is done by adding an entry to the printcap file. The following shows such an entry :
  50.  
  51. pslaser|PostScript LaserWriter:\
  52. :rp=pslaser:lp=:\
  53. :rm=server-mac:sd=/usr/spool/maclpd:\
  54. :lf=/usr/adm/lpd-errs: 
  55.  
  56. To print to this printer you use the command :
  57.  
  58. lpr -Ppslaser <filename> 
  59.  
  60. The "rm" entry tells lpr which machine the printer is connected to, in our case where Print66 is running.
  61.  
  62. The "rp" entry tells lpr which of the printers connected to this rm to print on. This name will be passed on to Print66 which will map the name to a printer as specified in the config file.
  63.  
  64. The "sd" entry tells the pathname of a spool directory. The "lf" entry tells the log file name.
  65.  
  66. If your LPD.config file on the Macintosh has an entry :
  67.  
  68. PRINTER pslaser PAP "" POSTSCRIPT # default 
  69.  
  70. the print command above would print to your default Appletalk Laserwriter printer.
  71.  
  72. What to do on an IBM AS/400 system to set it up as a print client
  73.  
  74. The syntax of a print request in the AS/400 is :
  75.  
  76. LPR RMTSYS(name_of_mac_in_DNS | *INTNETADR )
  77. PRTQ(name_of_mac_queue)
  78. FILE(name_of_as400_printfile)
  79. JOB(job_number/user_name/job_name | *)
  80. SPLNBR(number | *ONLY | *LAST)
  81. MFRTYPMDL(printer_model)
  82. [ INTNETADR(ip_adress) ] 
  83.  
  84. You can specify the Mac host by providing either a name which can be resolved by the AS/400 or an IP numerical address (INTNETADR option).
  85.  
  86. If you do not specify the job which generated the spool file, the AS/400 assumes it is the current job.
  87. For instance, I use the command :
  88.  
  89. LPR RMTSYS(BJRMAC) /* Name of my macintosh in our domain */
  90. PRTQ(RAW)
  91. FILE(QSYSPRT) /* or any other print file */
  92. SPLNBR(*LAST)
  93. MFRTYPMDL(*HPII) 
  94.  
  95. If the name of the Macintosh host (here BJRMAC) is defined correctly in your network DNS or in the AS/400's TCP/IP host table, and if there is an entry like the following inside the Config.LPD file on that Macintosh :
  96.  
  97. PRINTER "RAW" SERIAL "Printer port" 57600 10 N 8 
  98.  
  99. then the print request above should print correctly to a PCL printer (like HP Laserjet) connected to the Printer Port of the Macintosh.
  100.  
  101. Nota : on these examples, the name RAW is arbitrary, but was chosen because Hewlett-Packard network printers use the same.
  102.  
  103. If you are to print regularly, you can create on the AS/400 an outqueue object (OUTQ). This can be achieved through a command like this :
  104.  
  105. CRTOUTQ OUTQ(QGPL/BJRMACLPD) /* name of the OUTQ */
  106. RMTSYS(BJRMAC) /*name of my macintosh in our domain */
  107. RMTPRTQ(RAW) /* name defined on my mac's LPD.config */
  108. AUTOSTRWTR(1) CNNTYPE(*IP) DESTTYPE(*OTHER)
  109. MFRTYPMDL(*WSCSTA4) /* A4 paper format */
  110. WSCST(QWPHPLSR4) /* IBM's driver for the HP Laser 4 */
  111. /* for other printers, look for objects which type is *WSCST */ 
  112.  
  113. After that, all you will have to do in order to print is to send your spool files to the created outqueue.
  114.  
  115. What to do on another Macintosh to set it up as a print client
  116.  
  117. Nota : Remember that Print66 is a print server. Print formatting is to be achieved by the client.
  118.  
  119. You can use Apple's LaserWriter 8.5.1 or Later as a LPR postscript client. The Apple package includes a utility named "Desktop Printer Utility" (the name may vary in international versions of MacOS ; for instance, in French MacOS, it is "Utilitaire Service d’impression"). You could then connect an old postscript printer to a Mac, run Print66 on this machine to add LPR/LPD ability and avoid the use of AppleTalk for the rest of the network.
  120.  
  121. On the Macintoshes who will request print jobs :
  122.  
  123.  
  124. • Launch the Desktop Printer Utility. 
  125. • Select "Printer (LPR)" and click OK. 
  126. • In the "PostScript Printer Description (PPD) File" section, click on "Change..." and select the PPD for your printer. 
  127. • In the "Internet Printer" section, click on "Change...". 
  128. • Enter the IP address or domain name of the Mac which runs Print66 for "Printer Address". 
  129. • Enter the queue name as specified in the PRINTER line in the LPD.config file on the Mac where Print66 runs. 
  130. • Go to the File menu and select "Save". Enter a name and location for the desktop printer icon and click OK. The default name is the printer's IP address, and the default location is on the desktop. 
  131. • Quit. 
  132.  
  133. Nota :
  134.  
  135.  
  136. • Info based on Apple's TIL article 24409 
  137.  
  138. What to do on a Windoze system to set it up as a print client
  139.  
  140. Windows NT and Windows 98 support LPR printing. It is not included in the default OS install : you will have to explicitly install a service named Microsoft TCP/IP printing.
  141.  
  142. For Windows95, you will have to use a third party software, for instance Axis Print Monitor for Windows that I found at <http://www.axis.com/techsup/software/>.
  143.  
  144. I have checked that these solutions work, but you will have to read the documentation, because my doctor warned me not to spend a long time dealing with stuff related to a certain monopoly because it tends to make me horribly angry :-)
  145.  
  146. Version History
  147.  
  148. The latest version can be downloaded through the URL : <http://homepage.mac.com/barijaona/download/print66_folder.sit>
  149.  
  150. Print66 is a quick port from the lpDaemon program originally written by Casper Boon in Think C. The lpDaemon version 3.3.2 sources have been ported to Metrowerks CodeWarrior environment and have been recompiled. Some parts of the code have been rewritten due to the change of environment and the evolutions of Mac Headers, and to build a PowerPC version. I corrected a few bugs (and may have inadvertently added new ones :-) ), added the handshake support for serial printers and the support of USB printers.
  151.  
  152. I did this work because I wanted to print some AS/400 print files on a printer connected directly to my desktop Macintosh. The possibility to print to a serial port or USB printer appears nowadays more interesting than the use of AppleTalk, because many modern network printers already handle directly TCP/IP and LPR/LPD, and this explain the focus of my work.
  153.  
  154. • 0.68 (Jan, 11th 2002) : workaround a problem where long host names made the spool names get longer than the 31 characters the classic MacOS can handle. 
  155. • 0.67 : internal version. 
  156. • 0.66 (Sep, 5th 2001) : this version should run faster (better buffer handling) ; the Laserwriter printer driver is now opened in read only mode, which solves some issue on getting the resources and is safer anyway. 
  157. • 0.65 (June, 4th 2001) : solves a problem poking spool files under MacOS 9.1 ; this version should also run faster. 
  158. • 0.64 (Dec, 4th 2000) : solves another problem with the null byte marking the end of a data or control file. In certain situations, remote hosts using Apple Laserwriter driver could not print. 
  159. • 0.63 (Nov, 28 th 2000) : improves the way Print66 handles the null byte marking the end of a data or control file, and acknowledges it. The previous method was not 100% compliant with RFC1179 and could cause problems with certain clients or under certain network conditions. Added a FAQ to the documentation. 
  160. • 0.62 (Nov, 24 th 2000) : (was only sent to some testers) attempt to correct the way Print66 handles the null byte marking the end of a spool file and acknowledges it. 
  161. • 0.61 (Oct, 18 th 2000) : workaround for the LMGetUnitTableEntryCount missing in InterfaceLib in early PowerPC machines ROMs. 
  162. • 0.6 (Oct, 2nd 2000) : added USB printer support, and corrected some bugs. 
  163. • 0.5 (Aug, 14th 2000) : corrected a long standing crash for 68K machines ; added handshaking support for serial ports (either RTS/CTS or Xon/Xoff) ; requires use of explicit ports names for defining serial printers in the LPD.config file ; added support for Quit AppleEvent ; cleaned source from some pre-system 7 routines and adapted it to UniversalHeaders 3.3.2. The spectacular leap in version numbering is due to mistakes :-). Tested under MacOS 8.6 and MacOS 7.1. 
  164. • 0.0.4 (Jul, 14th 2000) : corrected the mailing routine ; bugs correction and clarification in log file. 
  165. • 0.0.3 (Jul, 11th 2000) : fixed a bug related to closing serial ports (already fixed in 0.0.2, but this version was never published). Reviewed the documentation and the default config file. Tested under MacOS 8.6. 
  166. • 0.0.2 (Jun, 30th 2000) : internal version. 
  167. • 0.0.1 (Jun, 20th 2000) : first version. 
  168.  
  169. To do (for hypothetical future versions, if someone is interested...)
  170.  
  171. - Add an AUTOCLEARLOG option,
  172.  
  173. - Review the interface which seems so 20th century... or pre-MacOS X unix... The idea is to make Print66 a faceless application and to have another app for setup.
  174.  
  175. - Improve interaction with other programs like MacGSView to enable for instance the generation of PDF files.
  176.  
  177. The Legal Stuff (too bad this world requires me to state that...)
  178.  
  179. The program is provided "as is" and without warranty, express and implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose. In no event will Barijaona Ramaholimihaso be liable for any damages, including lost profits, lost savings, or other incidental or consequential damages, even if Barijaona Ramaholimihaso is advised of the possibility of such damages, or for any claim by you or any third party.
  180.  
  181. If you do not agree with the above terms, simply do not use the program, or consider using an alternative program such as :
  182.  
  183.  
  184. • lpDaemon, the program from which Print66 is closely derived. lpDaemon can be found in InfoMac archives or HyperArchive, for instance at the URL <ftp://mirrors.aol.com/pub/info-mac/comm/inet/lp-daemon-34.hqx>, 
  185. • the commercial package IntragyAccess from Lucent Technology. Information about it can be found at <http://www.lucent.com/ins/products/maxtnt/intragyaccess.html>. 
  186.  
  187. For programmers : As Casper Boon who posted the original program source in 1993, I decided to make the source public, because it seems to interest more people than I thought, and this is the best guarantee I can provide to the Mac community that a cheap ;-)) solution to the issue I faced will remain. I hope you will give me a feedback. For copyright issues, you can probably use the sources to start other projects as soon as they remain freeware, but for commercial projects, you'd better contact Casper Boon because he has at least some moral rights on it. As for me, there is no problem whatever your project is, as far as you mention me in the About dialog box of your program. I am also interested to see how people use the source and would appreciate receiving copies of applications created with it, but this is not a requirement.
  188.  
  189. All products mentioned are trademarks or registered trademarks of their respective holders. Many parts of the code are work of Casper Boon who holds their original copyright.
  190.  
  191. Information presented here is accurate as of the time of writing, but is subject to change without notice.
  192.  
  193. "Whatever you do will be insignificant, but it is very important that you do it." --Mahatma Gandhi.
  194.